import request from '@/utils/request.js'
import md5 from 'js-md5'
import Qs from 'qs'
/**
 *
 * @param {登录} params
 * role_type 角色类型1.管理员2.开发,3.测试
 */
// 用户列表
export function UserQuery (params) {
  return request({
    url: '/user/query',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 添加用户
export function AddUser (params) {
  return request({
    url: '/user/updateAndAdd',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 删除用户
export function DelUser (params) {
  return request({
    url: '/user/delete',
    method: 'get',
    params
  })
}


// 项目列表新增修改
export function AddQuery (params) {
  return request({
    url: '/project/updateAndAddObject',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 项目列表删除
export function DelQuery (params) {
  return request({
    url: '/project/delete',
    method: 'get',
    params
  })
}

// 查询加班
export function QueryOvertime (params) {
  return request({
    url: '/overtime/queryOvertime',
    method: 'get',
    params
  })
}
// 新建和修改加班
export function AddOvertime (params) {
  return request({
    url: '/overtime/updateAndAddOvertime',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 删除加班
export function DelOvertime (params) {
  return request({
    url: '/overtime/deleteOvertime',
    method: 'get',
    params
  })
}
// 发版记录 新增修改
export function updateAndAdd (params) {
  return request({
    url: '/versions/updateAndAdd',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 查询发版
export function queryVersions (params) {
  return request({
    url: '/versions/query',
    method: 'get',
    params
  })
}
// 删除发版
export function DelVersions (params) {
  return request({
    url: '/versions/delete',
    method: 'get',
    params
  })
}
// 更新意见接口
export function updateVcontent (params) {
  return request({
    url: '/versions/updateVcontent',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function updateVcontentTime (params) {
  return request({
    url: '/versions/updateTime',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}